package com.hr.service;

import com.hr.dao.EvaluateDAO;
import com.hr.model.Evaluate;
import com.hr.util.AuthUtil;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EvaluateService
{
    @Autowired
    EvaluateDAO evaluateDAO;

    public Evaluate getEvaluateByEId(int eid)
    {
        return evaluateDAO.getEvaluateByEId(eid);
    }

    public List<Evaluate> getEvaluatesByAId(int aid)
    {
        return evaluateDAO.getEvaluatesByAId(aid);
    }

    public void insertEvaluation(int aid,Evaluate evaluate)
    {
        evaluateDAO.insertEvaluation(aid,evaluate);
    }

    public void updateEvaluation(Evaluate evaluate)
    {
        evaluateDAO.updateEvaluation(evaluate);
    }

    public void deleteEvaluation(int eid)
    {
        evaluateDAO.deleteEvaluation(eid);
    }
}
